<?php

	class EditMediaCommand implements ICommand
	{
		public function execute($event)
		{
			$md_id 	= $event->data['md_id'];
			$name 	= $event->data['name'];
			$teaser 	= $event->data['teaser'];
			
			EbModel::getModel('Media','Media')->update((object) array('md_id' => $md_id,'name' => $name,'teaser' => $teaser));
			
			return new Event('redirect',$event->data['ref']);
		}
	}